Skip to content

elliptic-curve: provide *EncodedPoint::from/to_sec1_bytes#2221

Merged
tarcieri merged 1 commit into
masterfrom
elliptic-curve/add-provided-sec1-methods
Jan 23, 2026
Merged

elliptic-curve: provide *EncodedPoint::from/to_sec1_bytes#2221
tarcieri merged 1 commit into
masterfrom
elliptic-curve/add-provided-sec1-methods

Conversation

@tarcieri
Copy link
Copy Markdown
Member

@tarcieri tarcieri commented Jan 23, 2026

Adds the following provided methods to these traits:

  • sec1::FromEncodedPoint::from_sec1_bytes
  • sec1::ToEncodedPoint::to_compressed_point
  • sec1::ToEncodedPoint::to_uncompressed_point
  • sec1::ToEncodedPoint::to_sec1_bytes

These methods were otherwise duplicated all over the place under the same name, and handle parsing sec1::EncodedPoint from a slice and serializing SEC1 points as Box<[u8]>.

Adds the following provided methods to these traits:
- `sec1::FromEncodedPoint::from_sec1_bytes`
- `sec1::ToEncodedPoint::to_compressed_point`
- `sec1::ToEncodedPoint::to_uncompressed_point`
- `sec1::ToEncodedPoint::to_sec1_bytes`

These methods were otherwise duplicated all over the place under the
same name, and handle parsing `sec1::EncodedPoint` from a slice and
serializing SEC1 points as `Box<[u8]>`.
@tarcieri tarcieri force-pushed the elliptic-curve/add-provided-sec1-methods branch from 61f52e6 to 168db98 Compare January 23, 2026 00:36
@tarcieri tarcieri merged commit 0fa1faa into master Jan 23, 2026
14 checks passed
@tarcieri tarcieri deleted the elliptic-curve/add-provided-sec1-methods branch January 23, 2026 00:37
@tarcieri tarcieri changed the title elliptic-curve: provide **EncodedPoint::from/to_sec1_bytes elliptic-curve: provide *EncodedPoint::from/to_sec1_bytes Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant